<template>
	<view class="" style="width: 100vw;height: 100vh">
		<view class="content" :style="{'background':kbackgroundColor}" style="min-height: 100vh">
			<hx-navbar title="盈利分析" :back="true" :fixed="false" :color="knavTitleColor" barPlaceholder="hidden"
				transparent="auto"></hx-navbar>
			<view class="container">
				<!-- 切换 -->
				<scroll-view class="scrollWrap" scroll-x="true" scroll-with-animation="true">
					<view class="list">
						<template v-if="ktheme == 'black'">
							<template v-for="(item, index) in typeList">
								<view class="item" :class="{'selected':typeIndex2 == index}" :key="index"
									@tap="on_tab_click(index)">
									{{item.name}}
								</view>
							</template>
						</template>
						<template v-else>
							<template v-for="(item, index) in typeList">
								<view class="item" :class="{'selected_more':typeIndex2 == index}" :key="index"
									@tap="on_tab_click(index)">
									{{item.name}}
								</view>
							</template>
						</template>
					</view>
				</scroll-view>
				<!-- 内容 -->
				<!-- 城市分销商  v-if="typeIndex2===0"> -->
				<view class="cont-box" v-if="typeIndex2===0">

					<view class="flex_center">
						<text>开拓店家数量</text>
						<view class="order_number_border_black">
							<input type="text" value="" @confirm="onInput" v-model="numberValue"
								placeholder="需输入300及以上的数字" class="order_number_border_input">
							<view class="order_number_border_bott" :style="[{background:kbuttonBgColor},{color:knavgroundColor}]"  @click="search()">搜索
							</view>
						</view>
					</view>
					<view class="box_bk" v-if='ifshow'
						:class="[{'border_sel_box_black':ktheme =='black'},{'border_sel_box_purple':ktheme =='purple'}]">
						<view class="title_vla">
							销售任务 <image :src="imgjiantou" mode="widthFix" class="more_image">
							</image>
						</view>
						<view class="flex_center" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_big"> {{cityList.tong}}</view>
								<view class="size_little"> 桶 </view>
							</view>
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_big">
									{{cityList.xiang}}
								</view>
								<view class="size_little">
									万箱
								</view>
							</view>
						</view>
					</view>
					<view class="box_bk "
						:class="[{'border_sel_box_black':ktheme =='black'},{'border_sel_box_purple':ktheme =='purple'}]">
						<view class="title_vla">
							人员建议 <image :src="imgjiantou" mode="widthFix" class="more_image">
							</image>
						</view>
						<view class="flex_center" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							<view class="task " :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="lheight">
									<view class="ds">
										员工 <text class="size_big m-row-30">6</text> 人
									</view>
									<view class="size_little m-t-10">
										6k/人
									</view>
								</view>
							</view>
							<view class="task " :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="lheight">
									<view class="ds">
										管理 <text class="size_big m-row-30">5</text> 人
									</view>
									<view class="size_little m-t-10">
										10k/人
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- 切换 -->
					<view class="" v-if='ifshow'>
						<view class="tab_if m-t-20">

							<view :class="[ktheme != 'purple'?'tab_rankblack':'tab_rank']">
								<view class="tab_shuzi" v-for="(item, index) in iftabLsit">
									<view v-if="supply===0" @click="tabDistriClick(index)"
										:class="[{distrsel:index == supply},{ distrnsel:index != supply}]">
										<view class="">
											{{item.name}}
										</view>
									</view>
									<view v-if="supply===1" @click="tabDistriClick(index)"
										:class="[{distrsel2:index == supply},{ distrnsel2:index != supply}]">
										<view class="">
											{{item.name}}
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="box_bk "
							:class="[{'border_sel_box_black':ktheme =='black'},{'border_sel_box_purple':ktheme =='purple'}]">
							<view class="title_vla" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
								预计支出项 <image :src="imgjiantou" mode="widthFix" class="more_image">
								</image>
							</view>
							<view class="cent_box"
								:style="[{'background': (ktheme == 'purple' ? '#ffffff': '#000000')},{'color': (ktheme == 'purple' ? '#7F37D3':'#ffffff')}]">
								<view class="flex_center border_dotted_Bottom">
									<view class="cent_size">
										机器成本
									</view>
									<view class="ds">
										<text class="size_big m-row-10">{{cityList.apparatus}}</text> 万元
									</view>
								</view>
								<view class="flex_center border_solid_Bottom">
									<view class="cent_size">
										服务包成本
									</view>
									<view class="ds">
										<text class="size_big m-row-10">{{cityList.serve}}</text> 万元
									</view>
								</view>

								<view class="flex_center border_solid_Bottom">
									<view class="cent_size">
										广告成本
									</view>
									<view class="ds">
										<text class="size_big m-row-10">{{cityList.advertising}}</text> 万元
									</view>
								</view>
								<view class="flex_center border_solid_Bottom">
									<view class="cent_size">
										员工工资
									</view>
									<view class="ds">
										<text class="size_big m-row-10">{{cityList.wage}}</text> 万元
									</view>
								</view>
								<view class="flex_center border_solid_Bottom">
									<view class="cent_size">
										员工提成
									</view>
									<view class="ds">
										<text class="size_big m-row-10">{{cityList.royalty}}</text> 万元
									</view>
								</view>
								<view class="flex_center border_solid_Bottom">
									<view class="cent_size">
										运营费
									</view>
									<view class="ds">
										<text class="size_big m-row-10">{{cityList.operator}}</text> 万元
									</view>
								</view>
								<view class="flex_center">
									<view class="cent_size">
										税金
									</view>
									<view class="ds">
										<text class="size_big m-row-10">{{cityList.taxes}}</text> 万元
									</view>
								</view>
								<view class="flex_center ">
									<view class="cent_size">
										店家利润
									</view>
									<view class="ds">
										<text class="size_big m-row-10">{{cityList.storeProfit}}</text> 万元
									</view>
								</view>
								<view class="border_bot">
								</view>
								<view class="flex_center">
									<view class="cent_size">
										全年支出
									</view>
									<view class="ds">
										<text class="size_big m-row-10">{{cityList.annualExpenditure}}</text> 万元
									</view>
								</view>
							</view>
						</view>
						<view class='whole_back m-t-20' :class="ktheme =='black' ? 'whole_black' :'whole_purple'">
							<view class="ds  m-t-10">
								<view class="">
									预计净利润
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{cityList.netMargin}}</text> 万元
								</view>
							</view>
							<view class="ds  m-t-10">
								<view class=""> 预计全年收入 </view>
								<view class="ds">
									<text class="size_big m-row-10">{{cityList.quanNianshouru}}</text> 万元
								</view>
							</view>

						</view>
					</view>



				</view>
				<!-- 店主 -->
				<view class="cont-box" v-if="typeIndex2===1">
					<view class="flex_center">
						<text>就餐人数</text>
						<view class="order_number_border_black">
							<input type="text" value="" @confirm="onInput" v-model="numberValue" placeholder="请输入就餐顾客数量"
								class="order_number_border_input">
							<view class="order_number_border_bott" :style="[{background:kbuttonBgColor},{color:knavgroundColor}]" @click="search()">搜索
							</view>
						</view>
					</view>
					<view class="box_bk"
						:class="[{'border_sel_box_black':ktheme =='black'},{'border_sel_box_purple':ktheme =='purple'}]">
						<view class="title_vla">
							销售任务 <image :src="imgjiantou" mode="widthFix" class="more_image">
						</view>
						<view class="flex_center" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_big">
									200
								</view>
								<view class="size_little">
									桶
								</view>
							</view>
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_big">
									3400
								</view>
								<view class="size_little">
									箱
								</view>
							</view>
						</view>
					</view>
					<view class="box_bk"
						:class="[{'border_sel_box_black':ktheme =='black'},{'border_sel_box_purple':ktheme =='purple'}]">
						<view class="title_vla">
							数品奖励 <image :src="imgjiantou" mode="widthFix" class="more_image">
						</view>

						<view class="flex_center p20"
							:class="[{'extrude_back_black':ktheme =='black'},{'extrude_back_purple':ktheme =='purple'}]"
							:style="[{'color':(ktheme == 'purple' ? '#7F37D3': '#ffffff')}]">
							<image v-if="ktheme =='black'" src="@/static/free/cost_403.png" mode="widthFix" class="image_cost"></image>
							<image v-else src="@/static/free/cost_403_2.png" mode="widthFix" class="image_cost"></image>
							<view class="w80">
								<view class=""> 购买488元/箱的精酿啤酒 </view>
								<view class="">可获得初始价值403.6元的数字科技商品；</view>
							</view>
						</view>

						<view class="flex_center p20 m-t-20"
							:class="[{'extrude_back_black':ktheme =='black'},{'extrude_back_purple':ktheme =='purple'}]"
							:style="[{'color':(ktheme == 'purple' ? '#7F37D3': '#ffffff')}]">
							<image  v-if="ktheme =='black' " src="@/static/free/cost_268.png" mode="widthFix" class="image_cost"></image>
							<image v-else src="@/static/free/cost_268_2.png" mode="widthFix" class="image_cost"></image>
							<view class="w80">
								<view class=""> 购买498元/桶20L的精酿啤酒</view>
								<view class="">可获得初始价值268元的数字科技商品；</view>
							</view>
						</view>
						<view class="Size28 m-t-20" :style="{'color':(ktheme == 'purple' ? '#7F37D3': '#EFCB93')}">
							*所有数字科技商品即可覆盖酒水费用
						</view>
					</view>
					<view class="box_bk"
						:class="[{'border_sel_box_black':ktheme =='black'},{'border_sel_box_purple':ktheme =='purple'}]">
						<view class="title_vla" :style="{'color':(ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							拉新奖励 <image :src="imgjiantou" mode="widthFix" class="more_image">
						</view>
						<view class="flex_center" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							<view class="task " :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="lheight">
									<view class="ds">
										若 <text class="size_big m-row-30">100</text> 人/天
									</view>
								</view>
							</view>
							<view class="task " :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="lheight">
									<view class="ds">
										<text class="size_big m-row-30">50%</text>注册率
									</view>
								</view>

							</view>
						</view>
						<view class="">

							<view class="flex_center p20 m-t-20"
								:class="[{'extrude_back_black':ktheme =='black'},{'extrude_back_purple':ktheme =='purple'}]"
								:style="[{'color':(ktheme == 'purple' ? '#7F37D3': '#ffffff')}]">
								<image  v-if="ktheme =='black'" src="@/static/free/cost_8.8.png" mode="widthFix" class="image_cost"></image>
								<image v-else src="@/static/free/cost_8.8_2.png" mode="widthFix" class="image_cost"></image>
								<view class="w80">
									<view class=""> 拉新1 人</view>
									<view class=""> 奖励初始价值8.8 元的数字科技商品；</view>
								</view>
							</view>
							<view class="flex_center p20 m-t-20"
								:class="[{'extrude_back_black':ktheme =='black'},{'extrude_back_purple':ktheme =='purple'}]"
								:style="[{'color':(ktheme == 'purple' ? '#7F37D3': '#ffffff')}]">
								<image  v-if="ktheme =='black'"  src="@/static/free/cost_888.png" mode="widthFix" class="image_cost"></image>
								<image v-else src="@/static/free/cost_888_2.png" mode="widthFix" class="image_cost"></image>
								<view class="w80">
									<view class=""> 拉新满 100 人</view>
									<view class=""> 奖励初始价值888元的数字科技商品；</view>
								</view>
							</view>
							<view class="flex_center p20 m-t-20"
								:class="[{'extrude_back_black':ktheme =='black'},{'extrude_back_purple':ktheme =='purple'}]"
								:style="[{'color':(ktheme == 'purple' ? '#7F37D3': '#ffffff')}]">
								<image  v-if="ktheme =='black'"  src="@/static/free/cost_8888.png" mode="widthFix" class="image_cost"></image>
								<image v-else  src="@/static/free/cost_8888_2.png" mode="widthFix" class="image_cost"></image>
								<view class="w80">
									<view class="">一周内拉新 1000人</view>
									<view class="">奖励初始价值 8888 元的数字科技商品；</view>
								</view>
							</view>


						</view>


					</view>
					<view class="ds whole_back m-t-20" v-if="ifshow"
						:class="ktheme =='black' ? 'whole_black' :'whole_purple'">
						<view class="">
							预计则年拉新收入
						</view>
						<view class="ds">
							<text class="size_big m-row-10">{{spencerList.recruit}}</text> 万元
						</view>

					</view>

					<view class="box_bk"
						:class="[{'border_sel_box_black':ktheme =='black'},{'border_sel_box_purple':ktheme =='purple'}]">
						<view class="title_vla" :style="{'color':(ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							用户持续购买分成 <image :src="imgjiantou" mode="widthFix" class="more_image">
						</view>
						<view class="flex_center" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_big">
									10
								</view>
								<view class="size_little">
									箱/年/人
								</view>
							</view>
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_big">
									50%
								</view>
								<view class="size_little">
									注册率
								</view>
							</view>
						</view>
					</view>

					<view class="ds whole_back  m-t-20" v-if="ifshow"
						:class="ktheme =='black' ? 'whole_black' :'whole_purple'">
						<view class="">
							预计年分成收入
						</view>
						<view class="ds">
							<text class="size_big m-row-10">{{spencerList.sustain}}</text> 万元
						</view>

					</view>

				</view>
				<!-- 供应链 -->
				<view class="cont-box" v-if="typeIndex2===2">
					<view >
						<view class="flex_center">
							<text>铺货店铺数量</text>
							<view class="order_number_border_black">
								<input type="text" value="" @confirm="onInput" v-model="numberValue" placeholder="请输入铺货店面数量" class="order_number_border_input">
								<view class="order_number_border_bott" :style="[{background:kbuttonBgColor},{color:knavgroundColor}]" @click="search()">搜索
								</view>
							</view>
						</view>
					</view>
					<view class="box_bk" :class="[{'border_sel_box_black':ktheme =='black'},{'border_sel_box_purple':ktheme =='purple'}]">
						<view class="title_vla">
							铺货最大标准<image :src="imgjiantou" mode="widthFix" class="more_image">
						</view>
						<view class="flex_center" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_big">
									8
								</view>
								<view class="size_little">
									桶/店
								</view>
							</view>
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_big">
									20
								</view>
								<view class="size_little">
									箱/店
								</view>
							</view>
						</view>
					</view>
					<view class=" m-t-20" :class="ktheme =='black' ? 'border_sel_box_black' :'border_sel_box_purple'" v-if="ifshow">
						<view class="title_vla p20 " :class="ktheme =='black' ? 'title_black_back' :'title_purple_back'" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#000000')}">
							按此标准
						</view>
						<view class="cent_box"
							>
							<view class="flex_center">
								<view class="cent_size">
									预计所需资金
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{supplyList.capital}}</text> 万元
								</view>
							</view>
							<view class="flex_center">
								<view class="cent_size">
									资金周期
								</view>
								<view class="ds">
									<text class="size_big m-row-10">7-38</text> 天
								</view>
							</view>
							<view class="flex_center">
								<view class="cent_size">
									预计所获奖励
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{supplyList.award}}</text> 万元
								</view>
							</view>
							<view class="flex_center">
								<view class="cent_size">
									预计投资回报率
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{supplyList.aewardReturn}}</text> %
								</view>
							</view>
							<view class="flex_center">
								<view class="cent_size">
									预计年化回报率
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{supplyList.annualizedReturn}}</text>%
								</view>
							</view>
						</view>
					</view>
				</view>
				<!-- 高级合伙人 -->
				<view class="cont-box" v-if="typeIndex2===3">
					<view class="">
						<view class="flex_center">
							<text>推广城市分销商</text>
							<view class="order_number_border_black">
								<input type="text" value="" @confirm="onInput" v-model="numberValue" placeholder="请输入推广数量" class="order_number_border_input">
								<view class="order_number_border_bott"  :style="[{background:kbuttonBgColor},{color:knavgroundColor}]" @click="search()">搜索
								</view>
							</view>
						</view>
					</view>
					<view class="box_bk" :class="[{'border_sel_box_black':ktheme =='black'},{'border_sel_box_purple':ktheme =='purple'}]">
						<view class="title_vla">
							城市分销商基础任务<image :src="imgjiantou" mode="widthFix" class="more_image">
						</view>
						<view class="flex_center" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_big">
									60,000
								</view>
								<view class="size_little">
									桶
								</view>
							</view>
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_big">
									100
								</view>
								<view class="size_little">
									万箱
								</view>
							</view>
						</view>
					</view>
					<view  class=" m-t-20" :class="ktheme =='black' ? 'border_sel_box_black' :'border_sel_box_purple'"  v-if="ifshow">
						<view class="title_vla p20"  :class="ktheme =='black' ? 'title_black_back' :'title_purple_back'" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#000000')}">
							按此标准
						</view>
						<view class="cent_box m-t-20"
						>
							<view class="flex_center">
								<view class="cent_size">
									全链路不使用供应链预计
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{advancedList.needNot}}</text> 万元
								</view>
							</view>
							<view class="flex_center">
								<view class="cent_size">
									引入供应链垫资预计
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{advancedList.quote}}</text> 万元
								</view>
							</view>
						</view>
					</view>
				</view>
				<!-- 渠道商 -->
				<view class="cont-box" v-if="typeIndex2===4">
					<view class="">
						<view class="flex_center">
							<text>员工人数</text>
							<view class="order_number_border_black">
								<input type="text" value="" @confirm="onInput" v-model="numberValue" placeholder="请输入推广员工数量" class="order_number_border_input">
								<view class="order_number_border_bott" :style="[{background:kbuttonBgColor},{color:knavgroundColor}]" @click="search()">搜索
								</view>
							</view>
						</view>
					</view>
					<view class="box_bk" :class="[{'border_sel_box_black':ktheme =='black'},{'border_sel_box_purple':ktheme =='purple'}]">
						<view class="title_vla">
							销售模型<image :src="imgjiantou" mode="widthFix" class="more_image">
						</view>
						<view class="flex_center" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_little"> 推广 </view>
								<view class="size_big"> 5 </view>
								<view class="size_little"> 人/天 </view>
							</view>
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_little">
									推广 </view>
								<view class="size_big"> 12 </view>
								<view class="size_little"> 家店/年 </view>
							</view>
						</view>
						<view class="flex_center" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#ffffff')}">
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_little"> 消费 </view>
								<view class="size_big">100</view>
								<view class="size_little"> 元/年/用户 </view>
							</view>
							<view class="task ds" :style="{'background': (ktheme == 'purple' ? '#f7eef8': '#202020')}">
								<view class="size_little">
									销售</view>
								<view class="size_big">200</view>
								<view class="size_little"> 元/店/天 </view>
							</view>
						</view>

					</view>
					<view class=" m-t-20" :class="ktheme =='black' ? 'border_sel_box_black' :'border_sel_box_purple'" v-if="ifshow">
						<view class="title_vla p20"  :class="ktheme =='black' ? 'title_black_back' :'title_purple_back'" :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#000000')}">
							按此标准
						</view>
						<view class="cent_box m-t-20" >
							<view class="flex_center">
								<view class="cent_size">
									预计每年交易金额
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{ditchList.deal}}</text> 万元
								</view>
							</view>
							<view class="flex_center">
								<view class="cent_size">
									预计利润
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{ditchList.profit}}</text> 万元
								</view>
							</view>
						</view>
					</view>
				</view>
				<!-- 推广达人 -->
				<view class="cont-box" v-if="typeIndex2===5">
					<view class="">
						<view class="flex_center">
							<text>每天拉新人数</text>
							<view class="order_number_border_black">
								<input type="text" value="" @confirm="onInput" v-model="numberValue" placeholder="请输入每年拉新客户数量" class="order_number_border_input">
								<view class="order_number_border_bott"  :style="[{background:kbuttonBgColor},{color:knavgroundColor}]" @click="search()">搜索
								</view>
							</view>
						</view>
						<view class="flex_center">
							<text>每年拉新店数</text>
							<view class="order_number_border_black">
								<input type="text" value="" @confirm="onInput2" v-model="shopValue" placeholder="请输入每年拉新店家数量" class="order_number_border_input">
								<view class="order_number_border_bott" :style="[{background:kbuttonBgColor},{color:knavgroundColor}]" @click="search2()">搜索
								</view>
							</view>
					
						</view>
					</view>
					<view class=" m-t-20" :class="ktheme =='black' ? 'border_sel_box_black' :'border_sel_box_purple'"v-if="ifshow || shopif==1">
						<view class="title_vla p20"   :class="ktheme =='black' ? 'title_black_back' :'title_purple_back'"  :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#000000')}">
							推广用户/年
						</view>
						<view class="cent_box">
							<view class="flex_center">
								<view class="cent_size">
									预计拉新奖励
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{promotionList.recruitment}}</text> 元
								</view>
							</view>
							<view class="flex_center">
								<view class="cent_size">
									预计用户持续消费奖励
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{promotionList.userPersistence}}</text> 元
								</view>
							</view>
						</view>

					</view>
					<view  class=" m-t-20" :class="ktheme =='black' ? 'border_sel_box_black' :'border_sel_box_purple'" v-if="ifshow  || shopif==2">
						<view class="title_vla p20" :class="ktheme =='black' ? 'title_black_back' :'title_purple_back'"  :style="{'color': (ktheme == 'purple' ? '#7F37D3': '#000000')}">
							推广店主/年
						</view>
						<view class="cent_box">
							<view class="flex_center">
								<view class="cent_size">
									预计拉新奖励
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{promotionList.storesPulled}}</text> 元
								</view>
							</view>
							<view class="flex_center">
								<view class="cent_size">
									预计店主持续消费奖励
								</view>
								<view class="ds">
									<text class="size_big m-row-10">{{promotionList.shopContinuity}}</text> 元
								</view>
							</view>
						</view>

					</view>
					<view class="ds whole_back m-t-20" v-if="ifshow ||shopif==1 || shopif==2"
							:class="ktheme =='black' ? 'whole_black' :'whole_purple'">
						<view class="">
							预计年总收入
						</view>
						<view class="ds">
							<text class="size_big m-row-10">{{promotionList.totalRevenue}}</text> 元
						</view>
					</view>
				</view>
				<!-- 请输入整数 -->
				<uni-popup ref="confirmDialog" type="center" :maskBackgroundColor="'rgba(0,0,0,0.5)'"
					:isMaskClick="false">
					<view class="store-view store-border-all tips-padding"
						:style="{'background':kbackgroundColor,color:knormalColor}"
						:class="[{'alert-border-black alert-border-shadow-black':ktheme =='black'},{'alert-border-purple':ktheme =='purple'}]">
						<text class="popup-title">提示</text>
						<text class="popup-subtitle">{{confimPopup}}</text>
						<view class="tips-bottom">
							<view class="tips-button"
								:class="[{'tips-cancel-bg-black':ktheme =='black'},{'tips-cancel-bg-white':ktheme =='purple'}]"
								@click="colfirmClose()">关闭</view>
							<view class="tips-button" :style="{background:kbuttonBgColor}" @click="confirmCheck()">
								确定
							</view>
						</view>
					</view>
				</uni-popup>

				<view class="" style="height: 90rpx;"> </view>
			</view>

		</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgjiantou: "@/static/free/black_jiantou.png",
				ifshow: false,
				iftabLsit: [{
					id: 0,
					name: '不使用供应链'
				}, {
					id: 1,
					name: '使用供应链垫资'
				}, ],
				numberValue: "",
				shopValue: "",
				shopif: 0,

				typeIndex2: 0,
				typeList: [{
					id: 1,
					name: '城市分销商'
				}, {
					id: 2,
					name: '店主'
				}, {
					id: 3,
					name: '供应链'
				}, {
					id: 4,
					name: '高级合伙人'
				}, {
					id: 5,
					name: '渠道商'
				}, {
					id: 6,
					name: '推广达人'
				}, ],
				ifpromotion1: false,
				ifpromotion2: false,
				supply: 0, //0为不使用供应链，1为使用供应链
				confimPopup: '', //弹框内容
				cityList: {}, //城市分销商
				spencerList: {}, //店主
				supplyList: {}, //供应链
				advancedList: {}, //高级合伙人
				ditchList: {}, //渠道商
				promotionList: {} //推广达人
			}
		},
		onPullDownRefresh() {
			this.ifshow = false
			this.numberValue = ""
			this.choiceValue = ""
			setTimeout(function() {
				uni.stopPullDownRefresh()
			}, 1000)
		},
		onLoad() {
			console.log("imgjiantou--", this.ktheme);
			if (this.ktheme == 'purple') {
				this.imgjiantou = '../../static/free/purple_jiantou.png'
			} else {
				this.imgjiantou = '../../static/free/black_jiantou.png'
			}
		},
		methods: {
			get_data_list() {
				//城市分销商
				if (this.typeIndex2 == 0) {
					if (this.numberValue <= 299) {
						this.confimPopup = '需输入300及以上的数!'
						this.$refs.confirmDialog.open()
					} else {
						//this.numberValue,  拓店家数量  this.supply  0为不使用供应链，1为使用供应链
						this.$api.getcityDistributor(this.numberValue, this.supply, res => {
							if (res.status) {
								this.cityList = res.data
								this.ifshow = true

							} else {
								this.$common.errorToShow(res.msg)
							}
						})
					}
					//店主
				} else if (this.typeIndex2 == 1) {
					this.$api.getspencer(this.numberValue, res => {
						if (res.status) {
							this.spencerList = res.data
							this.ifshow = true
						} else {
							this.$common.errorToShow(res.msg)
						}
					})
					//供应链
				} else if (this.typeIndex2 == 2) {
					this.$api.getsupply(this.numberValue, res => {
						if (res.status) {
							this.supplyList = res.data
							this.ifshow = true
						} else {
							this.$common.errorToShow(res.msg)
						}
					})
					//高级合伙人
				} else if (this.typeIndex2 == 3) {
					this.$api.getadvanced(this.numberValue, res => {
						if (res.status) {
							this.advancedList = res.data
							this.ifshow = true
						} else {
							this.$common.errorToShow(res.msg)
						}
					})
					//渠道商
				} else if (this.typeIndex2 == 4) {
					this.$api.getditch(this.numberValue, res => {
						if (res.status) {
							this.ditchList = res.data
							this.ifshow = true
						} else {
							this.$common.errorToShow(res.msg)
						}
					})
					//推广达人
				} else if (this.typeIndex2 == 5) {
					var nval = ""
					var sval = ""
					if (this.numberValue.trim() !== '' && this.shopValue.trim() !== '') {
						nval = this.numberValue
						sval = this.shopValue
					} else if (this.shopValue.trim() !== '') {
						nval = 0
						sval = this.shopValue
						this.shopif
					} else if (this.numberValue.trim() !== '') {
						nval = this.numberValue
						sval = 0
					}
					this.$api.getpromotion(nval, sval, res => {
						console.log("res", res)
						if (res.status) {
							if (this.numberValue.trim() !== '' && this.shopValue.trim() !== '') {
								this.ifshow = true
								this.shopif = 3
							} else if (this.shopValue.trim() !== '') {
								this.shopif = 2
							} else if (this.numberValue.trim() !== '') {
								this.shopif = 1
							}
							this.promotionList = res.data
						} else {
							this.$common.errorToShow(res.msg)
						}
					})
				}
			},
			//失去焦点调用
			onInput(e) {
				let value = e.detail.value;
				// 使用正则表达式匹配整数  
				const reg = /^\d+$/;
				if (!reg.test(value)) {
					// 如果不是整数，则阻止输入  
					this.confimPopup = '请输入整数!'
					this.$refs.confirmDialog.open()
				} else {
					this.numberValue = e.detail.value
					this.get_data_list()
				}
			},
			search() {
				let value = this.numberValue
				// 使用正则表达式匹配整数  
				const reg = /^\d+$/;
				if (!reg.test(value)) {
					// 如果不是整数，则阻止输入  
					this.confimPopup = '请输入整数!'
					this.$refs.confirmDialog.open()
				} else {

					this.get_data_list()
				}
			},
			search2(){
					let value = this.shopValue
								// 使用正则表达式匹配整数  
								const reg = /^\d+$/;
								if (!reg.test(value)) {
									// 如果不是整数，则阻止输入  
									this.confimPopup = '请输入整数!'
									this.$refs.confirmDialog.open()
								} else {
				
									this.get_data_list()
								}
			},
			onInput2(e) {
				let value = e.detail.value;
				// 使用正则表达式匹配整数  
				const reg = /^\d+$/;
				if (!reg.test(value)) {
					// 如果不是整数，则阻止输入  
					this.confimPopup = '请输入整数!'
					this.$refs.confirmDialog.open()
				} else {
					this.choiceValue = e.detail.value
					this.get_data_list()
				}
			},
			//关闭
			colfirmClose() {
				this.$refs.confirmDialog.close()
			},
			//确定
			confirmCheck() {
				this.numberValue = ''
				this.$refs.confirmDialog.close()

			}, //是否供应链
			tabDistriClick(val) {
				console.log("lxs----", val)
				if (this.numberValue.trim() !== '') {
					this.supply = val
					this.get_data_list()

				} else {
					uni.showToast({
						title: '请输入所需分析数据!',
						icon: 'none'
					});
				}
			},
			on_tab_click(id) {
				this.typeIndex2 = id
				this.numberValue = ""
				this.ifshow = false
			},
		}
	}
</script>

<style scoped lang="scss">
	//公用
	//类别名称
	.title_vla {
		font-weight: 400;
		font-size: 28rpx;
		margin: 20rpx 0;
	}

	// 两端对齐
	.flex_center {
		display: flex;
		justify-content: space-between;
		margin: 5rpx 0;
		align-items: center;

	}

	//标题背景颜色
	.title_black_back{
		height: 60rpx;
		margin: 0;
		color:#000;
		background: linear-gradient(90deg, #ECC58B, #FFECC4);//linear-gradient(90deg, #46A978, #C4C651);
		border-radius: 10rpx 10rpx 0rpx 0rpx;
		}
	.title_purple_back{
		height: 60rpx;
		margin: 0;
		background: linear-gradient(180deg, rgba(147,118,255,0.66), rgba(174,44,241,0.66));
		border-radius: 10rpx 10rpx 0rpx 0rpx;
		 
		
	}
	.p20 {
		padding: 10rpx 15rpx;
	}

	.cent_size {
		font-weight: 400;
		font-size: 26rpx;
	}

	.image_cost {
		width: 76.3rpx;
		padding-top: 13rpx;
	}

	.w80 {
		width: 83%;
	}

	//详细背景
	.cent_box {
		width: 630rpx;
		border-radius: 10rpx;
		padding: 26rpx;
	}

	//居中对齐
	.ds {
		display: flex;
		justify-content: space-between;
		align-items: center;

	}
.distrnsel2{
	color:#000;
}
	.extrude_back_black {
		width: 638rpx;
		background: linear-gradient(180deg, #ffecc473, #00000070);//linear-gradient(180deg, #ebfa6b6e, #00000070);
		border-radius: 8rpx;
		color: #000;
	}

	.extrude_back_purple {
		width: 638rpx;
		background: linear-gradient(180deg, #C4A0FF, #FFFFFF);
		border-radius: 8rpx;
	}

	.lheight {
		display: table-cell;
		height: 130rpx;
		vertical-align: middle;
		/*直居中 */
	}

	//背景块
	.task {
		padding: 0 20rpx 0 30rpx;
		margin: 14rpx 0;
		width: 302rpx;
		height: 136rpx;

		border-radius: 10rpx;
	}

	//背景块大字体
	.size_big {
		font-weight: 500;
		font-size: 40rpx;
		font-family: PingFang SC;
	}

	.Size28 {
		font-weight: 500;
		font-size: 28rpx;
		font-family: PingFang SC;
	}

	//底部边框线
	.border_bot {
		width: 620rpx;
		height: 1rpx;
		border: 1px solid #626262;
		opacity: 0.5;
	}

	.border_dotted_Bottom {
		border-bottom: 2rpx dotted #898989;
	}

	.border_solid_Bottom {
		border-bottom: 2rpx solid #898989;
	}

	//背景块小字体
	.size_little {
		font-weight: 400;
		font-size: 26rpx;
	}

	.tab_if {
		color: white;
	}

	//border-image: linear-gradient(0deg, #55CC7C, #F5F97F) 3 3;
	.border_sel_box_black {
		width: 687rpx;
		border: 4rpx solid transparent;
		background-clip: padding-box, border-box;
		background-origin: padding-box, border-box;
		border-radius: 20rpx;
		background-image: linear-gradient(to bottom, #000000, #0b0b0b), linear-gradient(0deg, #EFCB93, #FCE6BB);
		//linear-gradient(0deg, #EFCB93, #FCE6BB) 3 3;
		// padding: 10rpx 24rpx;
	}

	.border_sel_box_purple {
		width: 687rpx;
		border: 4rpx solid transparent;
		background-clip: padding-box, border-box;
		background-origin: padding-box, border-box;
		border-radius: 20rpx;
		 //  linear-gradient(0deg, #7776FF, #AE2CF1) 3 3;
		background-image: linear-gradient(to bottom, #ffffff, #ffffff), linear-gradient(0deg, #7776FF, #AE2CF1);
		// padding: 10rpx 24rpx;
		color: #AE2CF1;

	}

	.whole_back {
		width: 690rpx;
		border-radius: 10rpx;
		padding: 10rpx 20rpx;
	}

	.whole_black {
		color: #000;
		background:linear-gradient(90deg, #ECC58B, #FFECC4);// linear-gradient(90deg, #46A978, #C4C651);
	}

	.whole_purple {
		background: linear-gradient(180deg, rgba(147,118,255,0.66), rgba(174,44,241,0.66));
	}

	.m-row-30 {
		margin: 0 30rpx;
	}

	.radio_val {
		margin: 10rpx;
		text-align: center;
	}

	.tab_rankblack {
		margin-left: 10%;
		width: 80%;
		color: #fff;
		font-size: 25rpx;
		text-align: center;
		// height: 40rpx;
		line-height: 54rpx;
		display: flex;
		// justify-content: space-around;
		justify-content: center;
		// padding: 5px 8px;
		cursor: pointer;
		position: relative;
		pointer-events: none;

		.tab_shuzi {
			width: 40%;
			height: 100%;
			pointer-events: auto;
		}

		&::before {
			display: block;
			content: '';
			border-radius: 60rpx;
			border: 2px solid transparent;
			background: linear-gradient(90deg, #ECC58B, #FFECC4);// linear-gradient(180deg, rgba(244, 249, 123, 1), rgba(84, 203, 122, 1)) border-box;
			/* 2 */
			-webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
			/* 3 */
			-webkit-mask-composite: xor;
			/* 4 */
			mask-composite: exclude;
			position: absolute;
			width: 80%;
			height: 86%;
			padding: 2rpx;
		}

		.distrsel {
			// 
			background:  linear-gradient(90deg, #ECC58B, #FFECC4);//linear-gradient(180deg, rgba(244, 249, 123, 1), rgba(84, 203, 122, 1));
			border-radius: 80rpx;
			color: #000000;
		 
		}

		.distrnsel {
			color: rgba(255, 255, 255, 1.0);
		}

		//选中2
		.distrsel2 {
			background: linear-gradient(180deg,  #ECC58B, #FFECC4);
			border-radius: 80rpx;color: #000000;
		}

	}

	//切换 数字 卢德堡
	.tab_rank {
		margin-left: 10%;
		width: 80%;
		color: #fff;
		font-size: 25rpx;
		text-align: center;
		// height: 40rpx;
		line-height: 54rpx;
		display: flex;
		// justify-content: space-around;
		justify-content: center;
		// padding: 5px 8px;
		cursor: pointer;
		position: relative;
		pointer-events: none;

		.tab_shuzi {
			width: 40%;
			height: 100%;
			pointer-events: auto;
		}

		&::before {
			display: block;
			content: '';
			border-radius: 60rpx;
			border: 2px solid transparent;
			background: linear-gradient(90deg, #7776FF, #AE2CF1) border-box;
			/* 2 */
			-webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
			/* 3 */
			-webkit-mask-composite: xor;
			/* 4 */
			mask-composite: exclude;
			position: absolute;
			width: 80%;
			height: 86%;
		}

		.distrsel {
			background: linear-gradient(#7776FF 0%, #AE2CF1 100%);
			border-radius: 80rpx;
		}

		.distrnsel {
			color: #AE2CF1;
		}

		//选中2
		.distrsel2 {
			background: linear-gradient(#7776FF 0%, #AE2CF1 100%);
			border-radius: 80rpx;
		}

	}

	.cent_back_box {
		width: 670rpx;
		background: #202020;
		border-radius: 10rpx;
	}

	.scrollWrap {
		width: 100%;
		height: 88rpx;
		padding: 0 40rpx;
		color: #ffffff;
		box-sizing: border-box;
		white-space: nowrap;

		.list {
			height: 100%;
			display: flex;
			align-items: center;

			.item {
				font-size: 32rpx;
				color: #ffffff;
				font-weight: 400;
				margin-right: 46rpx;
			}

			.selected {
				color: rgba(163, 182, 101, 1);
				font-weight: bold;
			}

			.selected_more {
				color: #9780ff;
				font-weight: bold;
			}
		}

	}

	.cent_back_box {
		width: 670rpx;
		background: #202020;
		border-radius: 10rpx;
	}

	.scrollWrap {
		width: 100%;
		height: 88rpx;
		padding: 0 40rpx;
		color: #ffffff;
		box-sizing: border-box;
		white-space: nowrap;

		.list {
			height: 100%;
			display: flex;
			align-items: center;

			.item {
				font-size: 32rpx;
				color: #ffffff;
				font-weight: 400;
				margin-right: 46rpx;
			}

			.selected {
				color: #FFE1AD;//rgba(163, 182, 101, 1);
				font-weight: bold;
			}

			.selected_more {
				color: #9780ff;
				font-weight: bold;
			}
		}
	}

	.cont-box {
		width: 690rpx;
		margin: 10rpx auto;
		color: white;
	}



	/deep/.order_number .uni-input-input {
		color: #ffffff !important;
		padding-left: 20rpx;
	}

	/deep/ .uni-input-placeholder {
		color: #ffffff !important;
	}

	.order_number_border_black {
		width: 489rpx;
		height: 67rpx;
		margin: 2rpx auto;
		border-radius: 33rpx;
		padding: 2rpx;
		border: 1px solid white;
		display: flex;
		justify-content: space-evenly;
		align-items: center;
	}

	.order_number_border_input {
		width: 337rpx;
		height: 52rpx;
		padding-left: 22rpx;
	}

	.order_number_border_bott {
		width: 114rpx;
		height: 50rpx;
		// background: linear-gradient(90deg, #55CC7C, #F5F97F);
		border-radius: 25rpx;
		text-align: center;
		color: #0C3505;
		line-height: 50rpx;
	}

	.box_bk {
		width: 688rpx;
		margin-top: 33rpx;
		padding: 10rpx 24rpx;
		border-radius: 10rpx;
		border: 4rpx solid transparent;
	}

	.more_image {
		width: 106rpx;
		margin-left: 30rpx;
	}
</style>